#include "turnleftandright.h"
#include"Image.h"
#include <iostream>
#include <ctime>
#include<QImage>
#include<QAction>
#include<QDialog>
#include<iomanip>
#include "ui_mainwindow.h"
using namespace std;




turnleftandright::turnleftandright(QObject *parent) : QObject(parent)
{

}


void turnleftandright::changelook(QString filename){
    Image ima("filename");
    ima.Flip(1);
    ima.WriteBMP("UpDown.bmp");
    QString filename1="UpDown.bmp";// *******
    QImage* img=new QImage;
    if(! ( img->load(filename1) ) ) //加载图像
    {
        delete img;
        return;
    }
    QPixmap pix (filename1);
    //ui.label.setpixmap(qpixmap::fromqimage(*img))
    ui->label_2->setPixmap(pix);
}

